<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@taglib uri="http://www.zkoss.org/jsp/zul"  prefix="zk"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>

<tiles:insert definition=".loginLayout">
    <tiles:put name="content" type="String">
        <div style="font-family: Verdana, sans-serif;">
            <logic:present role="Customer,Employee,Admin,Manager">
                <div align="center">
                    <br/>
                    <br/>
                    <h4>If you want to login as another account,
                        please <a href="${pageContext.request.contextPath}/logout">logout</a> first.</h4>
                    <br/>
                    <br/>
                </div>
            </logic:present>

            <logic:notPresent role="Customer,Employee,Admin,Manager">
                <div align="center">
                    <br/>
                    <br/>
                    <h3>Enter your username and password to login to our system:</h3>
                    <br/>
                    <zk:page>
                        <zk:include src="/login.zul"></zk:include>
                        <logic:messagesPresent name="statusMessage">
                            <br/>
                            <strong>
                                <font color="red"><bean:write name="statusMessage"/></font>
                            </strong>
                        </logic:messagesPresent>
                    </zk:page>
                    <br/>
                    <br/>
                    <br/>
                    <h2 style="color: #000099;">Don't have an account ? <a href="${pageContext.request.contextPath}/Register.jsp">Register</a> is easy.</h2>
                    <br/>
                    <br/>
                </div>
            </logic:notPresent>
        </div>
    </tiles:put>
</tiles:insert>
